/* 通用页面容器 */
.page-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* 页面内容区域 - 关键修复 */
.page-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* 修改表格容器样式 */
.table-container {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* 确保分页器固定在底部 */
.pagination-wrapper {
  padding: 15px;
  background: white;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

/* 确保表格填充容器 */
.table-container :deep(.base-table-container) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* 页面头部区域 - 仅用于非PageHeader组件的页面 */
.page-header:not(.page-header-component) {
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 15px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.page-header .header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header .title-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-header .page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
}

.page-header .divider {
  width: 2px;
  height: 30px;
  background: var(--accent-color);
  opacity: 0.4;
}

.page-header .subtitle {
  font-size: 16px;
  color: var(--text-color);
  opacity: 0.8;
}

/* 操作按钮组 */
.action-group {
  display: flex;
  gap: 15px;
}

/* 搜索输入框 */
.search-input {
  width: 280px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.search-input:focus-within {
  box-shadow: 0 0 0 2px var(--primary-color-light-5);
}

.search-icon {
  color: var(--primary-color);
  font-size: 18px;
}

/* 主要操作按钮 */
.primary-button {
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-button:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button-icon {
  margin-right: 8px;
}

/* 状态文本样式 */
.status-text {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
}

.status-active {
  background-color: rgba(76, 175, 80, 0.15);
  color: #388e3c;
}

.status-inactive {
  background-color: rgba(244, 67, 54, 0.15);
  color: #d32f2f;
}

/* 操作按钮组样式 */
.action-buttons-group {
  display: flex;
  justify-content: center;
}

.action-button {
  font-size: 14px;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.action-button:hover {
  color: var(--secondary-color);
  transform: translateY(-1px);
}

/* 对话框样式 */
.management-dialog {
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.management-dialog .el-dialog__header {
  padding: 20px 24px;
  background: rgba(var(--primary-color-rgb), 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px 12px 0 0;
}

.management-dialog .el-dialog__title {
  color: var(--primary-color);
  font-weight: 600;
}

.management-dialog .el-dialog__body {
  padding: 24px;
}

.dialog-form .el-form-item {
  margin-bottom: 20px;
}

.dialog-form .el-input, 
.dialog-form .el-select {
  width: 100%;
}

.dialog-footer {
  padding: 0 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.dialog-footer .el-button {
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.dialog-footer .el-button--primary {
  background: var(--primary-color);
  border: none;
}

.dialog-footer .el-button--primary:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 主题特定样式 - 仅用于非PageHeader组件的页面 */
#app.atour .page-header:not(.page-header-component) {
  background: rgba(245, 242, 234, 0.95); /* 深海蓝调 */
}

#app.intercity .page-header:not(.page-header-component) {
  background: rgba(240, 244, 248, 0.95); /* 春意盎然 */
}

#app.marriott .page-header:not(.page-header-component) {
  background: rgba(248, 245, 240, 0.95); /* 暖阳金秋 */
}

/* 响应式调整 */
@media (max-width: 992px) {
  .page-header .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .action-group {
    width: 100%;
    justify-content: space-between;
  }
  
  .search-input {
    width: 65%;
  }
}

@media (max-width: 768px) {
  .action-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-input {
    width: 100%;
  }
  
  .primary-button {
    width: 100%;
  }
  
  .page-container {
    padding: 10px;
  }
}

/* 按钮统一样式 */
.primary-button {
  background: var(--primary-color);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-button:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.button-icon {
  margin-right: 8px;
}

/* 操作按钮组 */
.action-buttons {
  display: flex;
  gap: 8px;
}

.action-button {
  padding: 5px 10px;
  font-size: 12px;
}

/* 添加以下新变量 */
/* 卡片背景 */
:root {
  --card-bg-color: #ffffff;
  --card-border-color: #ebeef5;
  --stat-item-bg: #f5f7fa;
  --stat-item-hover-bg: #e6f7ff;
  --divider-color: #ebeef5;
  --icon-color: #606266;
  --danger-color: #f56c6c;
  --success-color: #67c23a;
}

/* 暗色主题适配 */
#app.dark {
  --card-bg-color: #1f1f1f;
  --card-border-color: #434343;
  --stat-item-bg: #2a2a2a;
  --stat-item-hover-bg: #333333;
  --divider-color: #434343;
  --icon-color: #8c8c8c;
}

/* 深海蓝调主题 */
#app.atour {
  --card-bg-color: #f9f5f0;
  --card-border-color: #e8dfd1;
  --stat-item-bg: #f1e9de;
  --stat-item-hover-bg: #e8dfd1;
}

/* 春意盎然主题 */
#app.intercity {
  --card-bg-color: #f0f5f9;
  --card-border-color: #d9e4ec;
  --stat-item-bg: #e6f0f7;
  --stat-item-hover-bg: #d9e4ec;
}

/* 暖阳金秋主题 */
#app.marriott {
  --card-bg-color: #f5f1ed;
  --card-border-color: #e6ddd3;
  --stat-item-bg: #eee8e1;
  --stat-item-hover-bg: #e6ddd3;
}

/* 添加对话框相关新变量 */
:root {
  --dialog-header-bg: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  --dialog-body-bg: #fafbfc;
  --dialog-footer-bg: #f8f9fa;
}

/* 深海蓝调主题对话框头部 */
#app.atour .enhanced-cash-dialog .dialog-header {
  background: linear-gradient(90deg, #1a365d 0%, #4a6584 100%);
}

/* 春意盎然主题对话框头部 */
#app.intercity .enhanced-cash-dialog .dialog-header {
  background: linear-gradient(90deg, #006747 0%, #008060 100%);
}

/* 暖阳金秋主题对话框头部 */
#app.marriott .enhanced-cash-dialog .dialog-header {
  background: linear-gradient(90deg, #8c1515 0%, #ac915b 100%);
}

/* 费用分摊模块样式 */
.fee-allocation-container {
  padding: 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.fee-info-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 10px;
  margin-bottom: 20px;
}

.fee-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 15px;
}

.fee-item {
  display: flex;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.fee-item .label {
  font-weight: 600;
  color: #495057;
  margin-right: 8px;
  min-width: 80px;
}

.fee-item .value {
  color: #212529;
  font-weight: 500;
}

.allocation-card {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 10px;
  margin-bottom: 20px;
}

.allocation-card .el-card__header {
  background: rgba(33, 150, 243, 0.1);
  border-bottom: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: 10px 10px 0 0;
}

.project-option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px 0;
}

.project-name {
  font-weight: 600;
  color: #1976d2;
  font-size: 14px;
}

.project-info {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
}

.amount-highlight {
  font-weight: bold;
  color: #2196f3;
  font-size: 16px;
}

.amount-warning {
  font-weight: bold;
  color: #ff9800;
  font-size: 16px;
}

.amount-danger {
  font-weight: bold;
  color: #f44336;
  font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .fee-info {
    grid-template-columns: 1fr;
  }
  
  .fee-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .fee-item .label {
    min-width: auto;
  }
} 